<template>
	<view class="contacts">
		<uni-list border>
			<uni-list-item title="姓名" :rightText="handler.handler"></uni-list-item>
			<uni-list-item title="岗位" :rightText="handler.userType"></uni-list-item>
			<uni-list-item title="电话" :rightText="handler.phone" clickable @click="makePhoneCall"></uni-list-item>
		</uni-list>
	</view>
</template>

<script>
	export default {
		name: "contacts",
		data() {
			return {
				handler: {}
			}
		},
		onLoad(options) {
			this.handler = JSON.parse(options.handler)
		},
		methods: {
			// 拨打电话
			makePhoneCall() {
				wx.makePhoneCall({
					phoneNumber: this.handler.phone
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.contacts {
		padding: 20rpx;
	}
</style>
